//
//  LookImageView.m
//  intelligent
//
//  Created by 甘世清 on 2024/3/1.
//

#import "LookImageView.h"

@implementation LookImageView

- (void)SQ_UIViewForSelfView{
    self.backgroundColor = UIColor.blackColor;
    [self addSubview:self.bgimage];
    [self.bgimage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self);
    }];
    UIButton * btn = [[UIButton alloc]init];
    btn.backgroundColor = UIColor.clearColor;
    [btn addTarget:self action:@selector(touchesBegan) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:btn];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self);
    }];
}
- (void)touchesBegan
{
    if (self.ImageBlock) {
        self.ImageBlock();
    }
   
}
- (UIImageView *)bgimage{
    if (!_bgimage) {
        _bgimage = [[UIImageView alloc]init];
        _bgimage.contentMode = UIViewContentModeScaleAspectFit;
        _bgimage.clipsToBounds = YES;
    }
    return _bgimage;
}

@end
